#ifndef GlobalsH
#define GlobalsH

  #define CheckMSG( ) Application->ProcessMessages( )
  #define _free( x ) if ( x ){ free( x ); x = NULL; }

  #include <vcl.h>
  //--------------
  #include <conio.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <string.h>

  typedef struct _TEXTDATA
  {
    LONG blStart;         // Start position for Pointer Table
    LONG blMaximum;       // Maximum location to insert
    LONG txOffset;        // current insertion point
    LONG rmLof;           // ROM Length of file
//    WORD ptData[0x4000];  // Pointer Table
    WORD *ptData;  // Pointer Table
    WORD txPtrIndex;      // Current string / pointer
    //------------------
    BYTE *rom;            // ROM buffer
  } TXTD;

  extern TXTD txt;
  extern char rfile[520];
  extern char dte[0x0100][0x04];
  extern char cmp[0x0200][0x10];

  extern LONG Snes2Pc( LONG ofs );
  extern LONG FileSize( FILE *tf );
  extern void RemoveLF_CR( char buf[] );
  extern int  Compress( char buf[ ], WORD Len );   

  #include "Inserter.h"  

#endif
